package com.hyp.pay.weight;

import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.TextView;

import com.hyp.pay.R;

/**
 * Created by xuwc on 2017/2/1.
 */
public class ProgressDialog extends Dialog{

    private TextView mText;
    private ProgressBar mProgressBar;


    public ProgressDialog(Context context) {
        super(context, R.style.Theme_Light_FullScreenDialogAct);
        init(context);
    }

    private void init(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.dialog_common, null);
        mText = (TextView) view.findViewById(R.id.tv_msg);
        mProgressBar = (ProgressBar) view.findViewById(R.id.progressbar);
        setContentView(view);
    }

    public void  setText(String str){
        mText.setText(str);
    }

    public void  isShowText(boolean show){
        if(show){
            mText.setVisibility(View.VISIBLE);
        }else{
            mText.setVisibility(View.GONE);
        }
    }
}
